Skip to content

console: capability overrides for aggregated models - #602

Merged
caigee-cmd merged 4 commits into
caigee-cmd:mainfrom
guyu233:upstream/aggregation-caps
Nov 27, 2026
Merged

caigee-cmd merged 4 commits into
caigee-cmd:mainfrom
guyu233:upstream/aggregation-caps

Conversation

@guyu233

@guyu233 guyu233 commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Change

  • Model-pool editor can pin context window, max output, reasoning levels and default effort per aggregated model (HeroUI fields, capability section in the editor).
  • /v1/models advertises exactly those overrides when set. Without overrides an aggregation advertises the conservative intersection of its members (smallest window and output, shared reasoning levels) instead of the first member's numbers.
  • Members resolve by provider and region, not by model name alone, so a pool cannot silently pick the wrong regional upstream.
  • A request that carries no reasoning intent uses the aggregation default level; each member provider still maps and clamps it to what its model allows.
  • Adds a numbered SQLite migration in internal/store/migrations.go for the stored capability columns (backup/restore covers them).
  • Also included: aggregation keys expose their logical model names in /v1/models and the key UI locks provider selection to the aggregation (supporting fix; without it the capability tests cannot resolve a pool member).

Behavior to review

  • This changes what /v1/models advertises for pools that previously copied the first member's limits. Existing pools keep working, but a client that sized requests from the old numbers will see the intersection until the operator sets overrides.
  • The new migration is additive; existing databases get empty capability columns and keep the intersection behavior.

Verification

  • go test ./... passes.
  • go build ./... passes.
  • cd frontend && npm run sync regenerated internal/webui/static for the editor changes.

- Model pool editor can pin context window, max output, reasoning levels and
  default effort for an aggregated model; /v1/models advertises exactly those
  values.
- Aggregations without overrides advertise the conservative intersection of
  their members (smallest window and output, shared reasoning levels) instead
  of the first member's numbers, and members resolve by provider and region
  rather than by model name alone.
- A request that carries no reasoning intent uses the aggregation default level;
  each member provider still maps and clamps it to what its own model allows.

@caigee-cmd caigee-cmd left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additive migration 034 only appends columns; shipped SQL is untouched. Pools without overrides advertise the intersection of their members (smallest window and output, shared reasoning levels) instead of the first member's numbers, and members resolve by provider and region. An aggregation default reasoning level fills only a request that carried none; each member still clamps it.

@caigee-cmd

Copy link
Copy Markdown
Owner

合入。迁移只在末尾追加了 034_aggregation_capabilities.sql,已发布的 SQL 没动,存量库拿到空列后维持交集行为。没设覆盖的聚合模型改为取成员的交集(最小窗口、最小输出、共同的 reasoning 档),不再照抄第一个成员的数字;成员按供应商加区域解析。聚合模型的默认 reasoning 档只填补客户端没带的请求,各成员仍按自己的模型再夹一次。

注意:以前按第一个成员的上限来估算请求大小的客户端,会看到交集后的数字,直到在控制台里设上覆盖值。

@caigee-cmd

Copy link
Copy Markdown
Owner

合入。迁移只在末尾追加了 034_aggregation_capabilities.sql,已发布的 SQL 没动,存量库拿到空列后维持交集行为。没设覆盖的聚合模型改为取成员的交集(最小窗口、最小输出、共同的 reasoning 档),不再照抄第一个成员的数字;成员按供应商加区域解析。聚合模型的默认 reasoning 档只填补客户端没带的请求,各成员仍按自己的模型再夹一次。

注意:以前按第一个成员的上限来估算请求大小的客户端,会看到交集后的数字,直到在控制台里设上覆盖值。

@caigee-cmd
caigee-cmd merged commit 7c2332e into caigee-cmd:main Nov 27, 2026
6 checks passed
guyu233 pushed a commit to guyu233/cli2api that referenced this pull request Nov 27, 2026
console: capability overrides for aggregated models
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants